package com.jingsai.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jingsai.POJO.Common.ScoreHistory;
import com.jingsai.POJO.Common.UserScore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.ArrayList;

@Mapper
public interface UserScoreMapper extends BaseMapper<UserScore> {
    @Select("select * from user_score order by score_sum desc ")
    ArrayList<UserScore> selectUserScore();

    @Update("update user_score set last_score = #{lastScore} ,last_fullscore = #{lastFullscore} ,fullscore_day = #{fullscoreDay} ,Sevenday_fullscore = #{sevendayFullscore} ,score_sum = #{scoreSum} ,today_firstac = #{todayFirstac} ,last_submit_date = #{lastSubmitDate} where user_info=#{userInfo}")
    void update(UserScore us);
}
